<html>

<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<title>测试软件</title>
<script src="./jquery-1.6.4.min.js"></script>

<script type="text/javascript">	
	var str;
  function autoInit(){
	for(var i = 1001;i <= 1016;i++){
		SynIDCard1.Port = i;
		str = SynIDCard1.Init();
		$("#RETSTR").val(str);
		if(str == 0){
			break;
		}
	}
  }
  function ReadCard_onclick()
  {
	if(str!=0){autoInit();}
  	$("#RETSTR").val(SynIDCard1.ReadCard());
   	$("#Name2").val(SynIDCard1.NameL);
   	$("#Sex2").val(SynIDCard1.SexL);
   	$("#Nation2").val(SynIDCard1.NationL);
   	$("#Born2").val(SynIDCard1.BornL);
   	$("#Address").val(SynIDCard1.Address);
   	$("#CardNo").val(SynIDCard1.CardNo);
   	$("#Activity2").val(SynIDCard1.ActivityL);
   	$("#Police").val(SynIDCard1.Police);
   	$("#PhotoName").val(SynIDCard1.PhotoName);
	$("#Photo").attr("src",SynIDCard1.PhotoName);
  }
  function ReadSAMID_onclick()
  {
  	var str=SynIDCard1.ReadSAMID();
  	$("#RETSTR").val(str);
  
  }
</script>

</head>

<p>
<object classid="clsid:E6E0A751-541A-4855-9A8D-35EB7122C950" id="SynIDCard1" codeBase="SynIDCard.Cab#version=1,0,0,1" width="0" height="0">
  <param name="_Version" value="65536">
  <param name="_ExtentX" value="635">
  <param name="_ExtentY" value="582">
  <param name="_StockProps" value="0">
</object>
</p>
<form method="POST" action="--WEBBOT-SELF--" name="form1">
  <p>
  读卡返回信息：<input type="text" name="RETSTR" id="RETSTR" size="49">
  <br>
	姓&nbsp;&nbsp;&nbsp; 名：<input type="text" name="Name2" id="Name2" size="11">
  <br>
	性&nbsp;&nbsp;&nbsp; 别：<input type="text" name="Sex2" id="Sex2" size="11">
  <br>
	民&nbsp;&nbsp;&nbsp; 族：<input type="text" name="Nation2" id="Nation2" size="11">
  <br>
	出生日期：<input type="text" name="Born2" id="Born2" size="20">
  <br>
	地&nbsp;&nbsp;&nbsp; 址：<input type="text" name="Address" id="Address" size="44"><BR>
  身份证号：<input type="text" name="CardNo" id="CardNo" size="34">
  <br>
	有 效 期：<input type="text" name="Activity2" id="Activity2" size="37">
  <br>
	发证机关：<input type="text" name="Police" id="Police" size="54"><BR>
  照片文件：<input type="text" name="PhotoName" id="PhotoName" size="54">
  照片文件：<img  id="Photo" src="">
  </p>
	<p>
  <input type="button" value="读身份证信息" id="ReadCardBtn" onclick="ReadCard_onclick()">
  <input type="button" value="读安全模块ID" id="ReadSAMIDBtn" onclick="ReadSAMID_onclick()"></p>
</form>

</body>

</html>